package com.aqiang.day0528_shop.main.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentStatePagerAdapter
import android.view.View
import com.aqiang.day0528_shop.main.view.fragment.*

class VpAdapter(fm:FragmentManager) : FragmentStatePagerAdapter(fm) {
    override fun getItem(p0: Int): Fragment {
        when(p0){
            0 -> return RefreshFragment()
            1 -> return TypeFragment()
            2 -> return FindFragment()
            3 -> return CarFragment()
            else -> return MineFragment()
        }
    }

    override fun getCount(): Int {
        return 5
    }

}